If the passed provider is not in this._providers, indexOf() returns -1 and
splice(-1, 1) silently removes the LAST provider in the array - an arbitrary,
unrelated provider.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9317
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4308>
(cherry picked from commit
a4c7d5e60e4f0982f7dfa048b7400eb4fdf2f97e)
_unregisterProvider(provider) {
const index = this._providers.indexOf(provider);
+ if (index < 0)
+ return;
+
this._providers.splice(index, 1);
if (provider.display)